//
//  DBSBaseViewController.m
//  DaBaiSite
//
//  Created by Mac-Mini-KingVision on 15/12/21.
//  Copyright © 2015年 admin. All rights reserved.
//

#import "LYBaseViewController.h"
#import "LYBaseRequest.h"
#import <YYCategories.h>
#import "LYProgressHUDManager.h"
#import "GiFHUD.h"

@interface LYBaseViewController ()



@end

@implementation LYBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRGB:0xf5f5f5];
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.navigationController.navigationBar.translucent = NO;
    self.gifhud = [[LYGifHUD alloc] initDefaultHudWithSuperView:self.view];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)dealloc
{
    NSLog(@"%@ 销毁了",NSStringFromClass([self class]));
    for (LYBaseRequest *reqeust in self.reqeusts) {
        if ([reqeust isKindOfClass:[LYBaseRequest class]]) {
            [reqeust stop];
        }
    }
}

-(UIStatusBarStyle)preferredStatusBarStyle {
    
    return UIStatusBarStyleLightContent;
}

-(NSMutableArray *)reqeusts
{
    if (_reqeusts == nil) {
        
        
        _reqeusts = [[NSMutableArray alloc] init];
        
    }
    return _reqeusts;
}




/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


